<script>
  function rsc_like(agent, rsc) {
    let btn = document.getElementById('btnlike')

    window.g_pronto.ontoloCreateObjectAuto({
      '@type': 'LikeAction',
      'agent': {
        '@type': 'Person',
        '@id': agent
      },
      'object': {
        '@id': rsc
      }
    }, {}).then(function(res) {
      btn.style.visibility = "hidden"
      // location.reload()
    })
  }
</script>
